﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="agentadd.aspx.cs" Inherits="UI.system.page.agent.agentadd" %>

<%@ Import Namespace="Model" %>
<%@ Import Namespace="Common" %>
<div style="margin: 15px;">
	<form class="layui-form" style="padding-left:0px;">
        <%if (admininfo.Role == 1 && info.AdminID==0){ %>
            <div class="layui-form-item">
			    <label class="layui-form-label"><font>代理商</font><em>*</em></label>
			    <div class="layui-input-inline">
				    <select id="agentname" name="adminid" lay-verify="required" lay-filter="sendtype" lay-search="search">
                        <%foreach(AdminInfo admin in adminlist){ %>
					        <option value="<%=admin.ID %>"><%=admin.RealName %></option>
                         <%} %>                         
				    </select>
			    </div>
		    </div>
        <%}else if(admininfo.Role == 1 && info.AdminID!=0){%>
            <div class="layui-form-item">
			    <label class="layui-form-label"><font>代理商</font><em>*</em></label>
			    <div class="layui-input-inline">
				    <select id="agentnames" name="adminid" lay-verify="required" lay-filter="sendtype">
                        <option value="<%=info.AdminID %>" readonly=''><%=info.AgentName%></option>                        
				    </select>
			    </div>
		    </div>
        <%} %>
        <div class="layui-form-item">
			<label class="layui-form-label"><font>电话</font><em>*</em></label>
			<div class="layui-input-inline">
                <input type="text" name="mobile" placeholder="请输入代理商电话" lay-verify="required" class="layui-input" value="<%=info.Mobile %>" >
			</div>
		</div>
         <div class="layui-form-item">
			<label class="layui-form-label">二维码</label>
			<div class="layui-input-inline">
				<div id="upload_products" class='upload_product <%=string.IsNullOrEmpty(info.QRCode)?"":"hidden" %>'><div id="upload_img"></div></div>
                 <div id="upload_show" class='upload_show <%=string.IsNullOrEmpty(info.QRCode)?"hidden":"" %>'>
                     <div id="img_container" class="img_container" src="<%=info.QRCode %>"><img src="<%=info.QRCode %>"/></div>
                     <div class="reupload"><a href="javascript:Re_Upload()">重传</a></div>
                 </div> <div style="float:left; color:red; padding-top:5px; font-size:12px; padding-left:10px;"></div>
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label"><font>微信</font><em>*</em></label>
			<div class="layui-input-inline">
                <input type="text" name="wechat" placeholder="请输入代理商微信" lay-verify="required" class="layui-input" value="<%=info.WeChat %>">
			</div>
		</div>
		<a lay-filter="save" lay-submit style="display: none;"></a>
	</form>
</div>